package grupo4;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class TesteServlet extends HttpServlet {

	private static Cliente cliente; 
	
	public static Cliente getCliente() {
		return cliente;
	}

	public static void setCliente(Cliente cliente) {
		TesteServlet.cliente = cliente;
	}

	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
        resp.setContentType( "text/html" );
        PrintWriter pw = resp.getWriter();

        pw.write("<html><head></head><body>\n");
    	pw.write(GeradorForm.GerarForm(cliente));
        pw.write("</body></html>\n");
	}
}
